package com.sf.dlb.mongo.repository;

import com.sf.dlb.mongo.model.UserShield;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * 用户屏蔽列表 Repository
 *
 * Created by jing.tan on 2018/5/21.
 */
@Repository
public interface UserShieldRepository extends MongoRepository<UserShield, String> {
    /**
     * 根据ID-查询
     * @param id
     * @param delFlag
     * @return
     */
    UserShield findByIdAndDelFlag(String id, String delFlag);
    /**
     * 根据用户id，类型-查询
     * @param userId
     * @param SheildType
     * @param delFlag
     * @return
     */
    List<UserShield> findByUserIdAndSheildTypeAndDelFlag(String userId, String SheildType, String delFlag);
    /**
     * 根据时间-查询
     * @param createDate
     * @param delFlag
     * @return
     */
    List<UserShield> findByCreateDateBeforeAndDelFlag(Date createDate, String delFlag);

}